/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nanosn.coffeemaker;

import uk.co.flamingpenguin.jewel.cli.Option;

/**
 * an annotated interface definition to automatically parse and present
 * command line arguments.
 * Example:
 * <p />
 * <code>
 * public static void main(String[] args) <br />
 * { <br />
 *      final ICommandLineArguments cla = <br/>
 *            CliFactory.parseArguments(ICommandLineArguments.class, args);<br/>
 *       if (cla.isSql()) <br />
 *       {<br />
 *           System.out.println(cla.getSql());<br />
 *       }<br />
 *       else<br />
 *       {<br />
 *           final Cli<ICommandLineArguments> cli = <br />
 *               CliFactory.createCli(ICommandLineArguments.class);<br />
 *           System.out.println(cli.getHelpMessage());<br />
 *       }<br />
 * }<br />
 * </code>
 * For more information about this library you can visit
 * http://jewelcli.sourceforge.net/index.html
 * @author selkhateeb
 */
public interface ICommandLineArguments
{

    /**
     * Gets whether the user has requested help.
     * @return true if help was requested.
     */
    @Option(helpRequest = true,
            description = "display help",
            shortName = "h")
    boolean isHelp();

    /**
     * Gets whether the user has requested to display the version.
     * @return true if user requested to display the version information.
     */
    @Option(shortName = "v",
            description = "Displays version information")
    boolean isVersion();

    /**
     * Gets the name of the new project.
     * @return a String containing the project name.
     */
    @Option(longName = "startproject",
            description = "Creates new project whith name ${value}")
    String getStartProject();

    /**
     * Gets whether the user has passed startproject argument.
     * @return true if user wants to start new project.
     */
    boolean isStartProject();

    /**
     * Gets the name of the new application.
     * @return a String containing the name of the new application.
     */
    @Option(longName = "startapp",
            description = "Creates new applicaiton with neme ${value}")
    String getStartApplication();

    /**
     * Gets whether the user has passed startapp argument.
     * @return true if user wants to start new applications.
     */
    boolean isStartApplication();

    /**
     * Gets the name of the application that the user wants to print it schema.
     * @return a String containing the application name.
     */
    @Option(longName = "sql",
            description = "Prints the CREATE TABLE SQL statements for " +
                          "the given app name(s)")
    String getSql();

    /**
     * Gets whether the user has passed sql argument.
     * @return true if user wants to generate schema of an application.
     */
    boolean isSql();


    /**
     * Gets whether to show debug messages.
     * @return true if user wants to display debug log messages.
     */
    @Option(longName = "debug",
            description = "Sets the log level to display all messages")
    boolean isDebug();

    /**
     * Gets whether to show verbose info messages.
     * @return true if user wants to display info messages.
     */
    @Option(longName = "verbose",
            description = "Sets the log level to display fine messages")
    boolean isVerbose();

    @Option(longName= "runserver", shortName="rs",
    description="Runs the embedded Tomcat Server")
    boolean isRunServer();


    @Option(longName="shell", description="Starts Groovy's interactive shell")
    boolean isShell();
}
